DX-1128: localise interactive components (SegmentedControl, TabMenu)#3413
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ef72e03 to
02d982a
Compare
c57d361 to
eb5a063
Compare
02d982a to
a74f1b6
Compare
eb5a063 to
6f2cac7
Compare
a74f1b6 to
e801746
Compare
6f2cac7 to
e11ceaf
Compare
e801746 to
cee3a61
Compare
e11ceaf to
f7308b7
Compare
cee3a61 to
88c9b9f
Compare
f7308b7 to
b7b6074
Compare
b7b6074 to
622c4dd
Compare
88c9b9f to
32bc1f7
Compare
622c4dd to
8c73370
Compare
32bc1f7 to
2f29be3
Compare
2f29be3 to
d9f00ba
Compare
8c73370 to
486571c
Compare
d9f00ba to
9d02706
Compare
486571c to
94e7bcb
Compare
94e7bcb to
bb75ac0
Compare
9d02706 to
fa0d218
Compare
bb75ac0 to
0e10dee
Compare
…bMenu) (DX-1128) Vendor SegmentedControl and TabMenu locally, off @ably/ui/core. SegmentedControl's leftIcon/rightIcon props now take a ReactNode (Heroicon or Ably glyph passed directly, sized by the control) rather than an icon-name string, matching the glyphs-only local Icon and the rest of the localised components.
0e10dee to
72f8545
Compare
|
Where these components are used (review aid):
Both have a live consumer at this PR's merge point. Two more ~ 𝒞𝓁𝒶𝓊𝒹𝑒 |
kennethkalmer
left a comment
There was a problem hiding this comment.
Reviewed against the @ably/ui source — faithful vendoring, diffs are entirely prettier/quote + import rewire, no logic drift.
- SegmentedControl:
leftIcon/rightIcon→ReactNode, rendered viaIconSlotwithiconColor = contentColorStyles[variant][activeKey](same value the old<Icon color>got) and sizes preserved (md 23px / sm 22px / xs 20px). - TabMenu:
ReactNodecontent, no Icon usage — pure formatting/cn rewire. es-toolkitpromoted to a direct dep for TabMenu'sthrottle; Header delta is just the TabMenu import swap.
Also closes out both notes from #3412: the ExamplesRenderer leftIcon string is now wrapped in <Icon> (no more literal-text footgun), and IconSlot extracts the shared sizing slot (consumed here by SegmentedControl).
Approving.
~ 𝒢𝓁𝒶𝓊𝒹𝑒
Part of DX-1128. Localises the interactive components.
What
src/components/ui/SegmentedControl.tsx+TabMenu.tsx, vendored and rewired to local Icon/cn (es-toolkitdirect dep).SegmentedControl'sleftIcon/rightIconprops now take aReactNode(a Heroicon or Ably<Icon>glyph passed directly, sized by the control).Behaviour
No visual change intended.
Stack (DX-1128)
@ably/uitokens + reset/core CSS (merged)cn+heightsutilsIconcomponent (Ably glyphs only; Heroicons imported directly)@ably/uiTailwind scan#3410–#3416 are a linear stack, each building on the previous; #3409 has merged to
main. ▶ = this PR.Testing
🤖 Generated with Claude Code